package com.yanqu.road.entity.activity.zhenhuan.thirdProcess;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

/**
 * 第二阶段有资格才能初始化
 */
@FieldTypeAnnotation(tableName = "t_c_zhenhuan_third_process_user_data", desc = "跨服甄嬛传三阶段用户数据")
public class CrossZhenHuanThirdProcessUserData extends DataObject {
    @FieldTypeAnnotation(select = true, update = true, desc = "活动id")
    private int activityId;
    @FieldTypeAnnotation(select = true, update = true, desc = "用户id")
    private long userId;
    @FieldTypeAnnotation(desc = "二阶段等级")
    private int level;
    @FieldTypeAnnotation(desc = "二阶段威望")
    private long prestige;
    @FieldTypeAnnotation(desc = "二阶段榜单更新时间")
    private long lastUpdateTime;
    @FieldTypeAnnotation(desc = "位置（排名）")
    private int pos;
    @FieldTypeAnnotation(desc = "三阶段积分")
    private long score;
    @FieldTypeAnnotation(desc = "开宴次数")
    private int banquetNum;

    public CrossZhenHuanThirdProcessUserData() {
    }

    public CrossZhenHuanThirdProcessUserData(int activityId, long userId) {
        this.activityId = activityId;
        this.userId = userId;
        setInsertOption();
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public int getPos() {
        return pos;
    }

    public void setPos(int pos) {
        if (this.pos != pos) {
            this.pos = pos;
            setOp(DataStatus.Update);
        }
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        if (this.level != level) {
            this.level = level;
            setOp(DataStatus.Update);
        }
    }

    public long getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(long lastUpdateTime) {
        if (this.lastUpdateTime != lastUpdateTime) {
            this.lastUpdateTime = lastUpdateTime;
            setOp(DataStatus.Update);
        }
    }

    public long getScore() {
        return score;
    }

    public void setScore(long score) {
        if (this.score != score) {
            this.score = score;
            setOp(DataStatus.Update);
        }
    }

    public long getPrestige() {
        return prestige;
    }

    public void setPrestige(long prestige) {
        this.prestige = prestige;
        setUpdateOption();
    }

    public int getBanquetNum() {
        return banquetNum;
    }

    public void setBanquetNum(int banquetNum) {
        if (this.banquetNum != banquetNum) {
            this.banquetNum = banquetNum;
            setOp(DataStatus.Update);
        }
    }
}
